@extends('layouts.admin')
@section('title') @parent 商品分类管理 @stop
@section('page_title')@parent
添加商品分类
@show
@section('breadcrumb')@parent
{{ Breadcrumbs::render('product-category-create') }}
@show
@section('content')
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">添加商品分类</h3>
                
            </div><!-- /.box-header -->
            <form fole="form" method="post" action="{{ route('admin.product_category.add') }}">
            <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
            <div class="box-body">
                <div class="form-group">
                    <label for="cat_title">分类标题</label>
                    <input type="text" name="data[title]" id="cat_title" placeholder="分类标题" value="" />
                </div>
                <div class="form-group">
                    <label for="cat_sort">排序</label>
                    <input type="text" name="data[sort]" id="cat_sort" placeholder="排序" value="0" />
                </div>
                <div class="form-group">
                    <label for="cat_parent">上级分类</label>
                    <select class="form-control" name="data[parent_id]" id="cat_parent">
                        <option value="0">无</option>
                        @foreach ($categories as $cat)
                        <option value="{{ $cat->id }}">{{ $cat->title }}</option>
                        @endforeach
                    </select>
                </div>
                <div class="form-group">
                    <label>规格</label>
                    @foreach ($specs as $spec)
					<div>
						<input type="checkbox" name="specs[]" value="{{ $spec->id }}"> {{ $spec->name }}
                    </div>
                    @endforeach
                </div>
            </div><!-- /.box-body -->
            <div class="box-footer">
                <button class="btn btn-primary" type="submit">保存</button>
            </div>
            </form>
        </div><!-- /.box -->
    </div>
</div>


@stop